<template>
    <div class="cart-list">
        <Scroll class="content" ref="scroll">
            <CartListItem v-for="(item,index) in cartList" :key="index" :product="item"></CartListItem>
        </Scroll>
    </div>
</template>
<script>
import Scroll from 'components/common/scroll/Scroll'

import CartListItem from './CartListItem'

import {mapGetters} from 'vuex'
export default {
    name:'CartList',
    components:{
        Scroll,
        CartListItem,
    },
    data() {
        return {
            
        }
    },
    computed: {
        ...mapGetters(['cartList'])
    },
    activated() {
        this.$refs.scroll.refresh()
    },
}
</script>
<style scoped>
.cart-list{
    width: 100%;
    height: 100%;
}
.content{
    position: absolute;
    top: 44px;
    bottom: 99px;
    left: 0;
    right: 0;
    width: 100px;
    overflow: hidden;
    width: 100%;
}
</style>